import { request } from '@/utils/request';

/** 登录 */
export const queryUpdate = (query) => {
  return request<{ data: any }>({
    url: `/admin/sysApp/getPackage`,
    method: 'GET',
    query,
  });
  // return {
  //   code: 1,
  //   type: '',
  //   content: '',
  //   url: 'https://appthwater.thwater.com:30001/group1/M00/50/A5/wKgIA2YR7W6AFytBAAV1hqLoiFE301.wgt',
  // };
};

export const getDicts = (type: String) => {
  return request({
    url: `/admin/dict/type/${type}`,
    method: 'GET',
  });
};

export const queryMenuList = () => {
  return request({
    url: `/admin/menu`,
    method: 'GET',
    query: {
      clientType: 1,
    },
  });
};

export const queryBadge = () => {
  return request({
    url: `/engine/task/list/badge`,
    method: 'GET',
  });
};

export const getPmDicts = (type: String) => {
  return request({
    url: `/pm/dict/type/${type}`,
    method: 'GET',
  });
};
export const getMessageNumber = () => {
  return request({
    url: `/admin/sysMessage/getUnReadMessageNumber`,
    method: 'GET',
  });
};
